home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / lan / tliws3.zip / DOS / POLL.H next >
C/C++ Source or Header  |  1992-10-13  |  2KB  |  114 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * (C) Unpublished Copyright of Novell, Inc. All Rights Reserved             *
  4. *                                                                           *
  5. *  No part of this file may be duplicayed, revised, translated, localized   *
  6. *  or modified in any manner or compiled, linked or uploaded or downloaded  *
  7. *  to or from any computer system without the prior written consent of      *
  8. *  Novell, Inc.                                                             *
  9. *                                                                           *
  10. *****************************************************************************/
  11.  
  12. /*
  13.  *   OS specific definitions - DOS
  14.  */
  15.  
  16. /*  ---------- DOS Specific definitions */
  17.  
  18. #ifdef NWDOS
  19.  
  20. #ifndef API
  21. #define API
  22. #endif  
  23.  
  24. #ifndef FAR
  25. #define FAR 
  26. #endif
  27.  
  28. #endif /* NWDOS */
  29.  
  30. /*  ---------- OS/2 Specific definitions */
  31.  
  32. #ifdef NWOS2
  33.  
  34. #ifndef API
  35. #define API pascal far _loadds
  36. #endif  
  37.  
  38. #ifndef FAR
  39. #define FAR far
  40. #endif
  41.  
  42. #endif /* NWOS2 */
  43.  
  44. /*  ---------- Windows Specific definitions */
  45.  
  46. #ifdef NWWIN
  47.  
  48. #ifndef API
  49. #define API pascal far
  50. #endif  
  51.  
  52. #ifndef FAR
  53. #define FAR  far
  54. #endif
  55.  
  56. #endif /* NWWIN */
  57.  
  58. /*
  59.  *   End of OS specific definitions
  60.  */
  61.  
  62. #define    NPOLLFILE    20
  63.  
  64. /* Poll masks */
  65. #define    POLLIN        01    /* message available on read queue */
  66. #define    POLLPRI        02    /* priority message available */
  67. #define    POLLOUT        04    /* stream is writable */
  68. #define    POLLERR        010    /* error message has arrived */
  69. #define    POLLHUP        020    /* hangup has occurred */
  70. #define    POLLNVAL    040    /* invalid fd */
  71.  
  72.  
  73. /* array of streams to poll */
  74. struct pollfd {
  75.     int    fd;
  76.     short    events;
  77.     short    revents;
  78. };
  79.  
  80.  
  81. #ifndef UNIX5_3
  82.  
  83. /* I_POLL structure for non-5.3 systems */
  84. struct strpoll {
  85.     unsigned long    nfds;
  86. #ifdef CPU_808X
  87. #ifdef    far
  88. #undef    far
  89.     struct pollfd    far * pollfdp;
  90. #define    far
  91. #else
  92.     struct pollfd    far * pollfdp;
  93. #endif
  94. #else
  95.     struct pollfd    * pollfdp;
  96. #endif
  97.     int        timeout;
  98. };
  99.  
  100. #endif
  101.  
  102.  
  103. #ifdef __cplusplus
  104. extern "C" {
  105. #endif
  106.  
  107. extern int API poll(struct pollfd FAR fds[], unsigned long nfds, int timeout);
  108.  
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112.  
  113.  
  114.